--- id: TASK-029 title: 'TUI: Persist last active page across restarts' status: To Do assignee: [] created_date: '2026-06-12 04:21' labels: - tui - enhancement dependencies: - TASK-021 priority: low ordinal: 29000 --- ## Description The TUI always opens on the Personal page. Save and restore the last active page alongside theme state. State file location: `~/.local/share/dashboard/tui_state.json` (shared with TASK-021). Implementation: - On `action_page()`, update the state file with `"page_id": page_id` - On `on_mount()`, read the file and call `action_page(saved_page_id)` after layout is ready - Validate that `saved_page_id` is in `PAGES` before applying; fall back to `page-personal` ## Acceptance Criteria - [ ] #1 TUI reopens on the page that was active when it was last closed - [ ] #2 Invalid saved page falls back to Personal without error - [ ] #3 Shares state file with theme persistence (TASK-021)